<%--
  Created by IntelliJ IDEA.
  User: wyp
  Date: 2020/5/8
  Time: 22:48
  To change this template use File | Settings | File Templates.
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<style>
    body{
        font-size: 15px;
        font-family: Arial;
    }
    a{
        color:#999;
    }
    .redColor{
        color:#C40000 !important;
    }
    nav.top{
        background-color: #f2f2f2;
        padding-top: 5px;
        padding-bottom: 5px;
        border-bottom:1px solid  #e7e7e7;
    }
    nav.top span, nav.top a{
        color: #999;
        margin: 0px 10px 0px 10px;
    }
    nav.top a:hover{
        color: #C40000;
        text-decoration: none;
    }
</style>
<nav class="top ">
    <a href="index.jsp">
        <span class="glyphicon glyphicon-education redColor"></span>
        小新首页
    </a>
    <span>嗷呜，欢迎来到小新の家</span>
    <%
        String userName = (String)session.getAttribute("user");
        if(userName != null){
    %>
        <a href="#nowhere">欢迎：<%=userName%></a>
        <a href="./login/logout.jsp">退出</a>
    <%
        }else {
    %>
    <a href="./login">请登录</a>
    <a href="./register">免费注册</a>
    <%
        }
    %>
    <span class="pull-right">
            <a href="./myOrder">我的订单</a>
            <a href="./myOrder">
            <span class=" glyphicon glyphicon-shopping-cart redColor" ></span>
           </a>
    </span>

</nav>
